﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NhbHelper;
using NhbHelper.Entities;
using NHibernate;
using NhbHelper.DataAccess;
using System.Collections;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected ISession m_session;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            m_session = NHibernateHttpModule.CurrentSession;
            ISQLQuery iq = m_session.CreateSQLQuery("select sys_context('USERENV','DB_NAME') as Instance from dual");
            iq.AddScalar("Instance", NHibernateUtil.String);
            lblEnv.Text = "Environment: " + (iq.List())[0].ToString();
        }
       
    }
}
